package com.oracle.vo;

import java.io.Serializable;

/**
 * 领域数据传输对象
 * @param <T>
 */
public class ResultEntity<T> implements Serializable{

	public static final Integer CODE_SUCCESS = 200;

	public static final Integer CODE_FAIL = 201;

	public static final String MSG_SUCCESS = "success";
	
	private Integer code;
	
	private String msg;
	
	private T data;

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public ResultEntity(Integer code, String msg) {
		super();
		this.code = code;
		this.msg = msg;
	}

	public ResultEntity() {
		super();
		// TODO Auto-generated constructor stub
	}

	public ResultEntity(Integer code, String msg, T data) {
		super();
		this.code = code;
		this.msg = msg;
		this.data = data;
	}

	@Override
	public String toString() {
		return "ResultEntity [code=" + code + ", msg=" + msg + ", data=" + data + "]";
	}
	
	

}
